package edu.zzuli.model.xt.pzzc.gnsq;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;

import edu.zzuli.common.TreeNode;
import edu.zzuli.model.xt.pzzc.gnsq.iface.GnsqService;

/**
 * @author tianshaojie
 * @date 2011-1-16
 * @discription : 
 */
@Controller
public class ShowGnqxTreeAction {
	
	@Resource
	GnsqService gnsqService;
	
	private String czlbId;
	
	private String xtgns;
	
	private String ajaxResult;
	
	private List<TreeNode> treeNodes;
	
	public String execute() {
		this.treeNodes = gnsqService.getXtgnTreeNode(czlbId);
		ajaxResult = "success";
		return ajaxResult;
	}
	public String addOrModGnqx() {
		this.gnsqService.saveGnqx(czlbId, xtgns);
		ajaxResult = "success";
		return ajaxResult;
	}

	public void setCzlbId(String czlbId) {
		this.czlbId = czlbId;
	}
	public String getCzlbId() {
		return czlbId;
	}
	public void setTreeNodes(List<TreeNode> treeNodes) {
		this.treeNodes = treeNodes;
	}

	public List<TreeNode> getTreeNodes() {
		return treeNodes;
	}
	
	public void setAjaxResult(String ajaxResult) {
		this.ajaxResult = ajaxResult;
	}
	
	public String getAjaxResult() {
		return ajaxResult;
	}
	
	public void setXtgns(String xtgns) {
		this.xtgns = xtgns;
	}
	
	public String getXtgns() {
		return xtgns;
	}
}
